Python: class ImageExport

Python: class ImageExport

class ImageExport(object)


Image export

Class ImageExport() provides the bitmap graphics exporting for Python scripting as you know it from Export/Save as Image menu. See related class PDFfile() and procedure savePageAsEPS().

Example:
i = ImageExport()
i.type = 'PNG' # select one from i.allTypes list
i.scale = 200 # I want to have 200%
i.name = '/home/subik/test.png'
i.save()

Last two lines should be replaced with: i.saveAs('/home/subik/test.png')

Methods defined here

__init__(...)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

save(...)
save() -> boolean

Saves image under previously set 'name'.

saveAs(...)
saveAs('filename') -> boolean

Saves image as 'filename'.

Data and other attributes defined here

__new__ = <built-in method __new__ of type object>

T.__new__(S, ...) -> a new object with type S, a subtype of T

allTypes = <attribute 'allTypes' of 'ImageExport' objects>

Available types. Read only list of strings.

dpi = <member 'dpi' of 'ImageExport' objects>

This value will be used for export as DPI. Read/write integer.

name = <attribute 'name' of 'ImageExport' objects>

Filename of the image. With or without path. Read/write string.

quality = <member 'quality' of 'ImageExport' objects>

Quality/compression: minimum 1 (poor), maximum 100 (qaulity). Read/write integer.

scale = <member 'scale' of 'ImageExport' objects>

This is the scaling of the image. 100 = 100% etc. Read/write iteger.

type = <attribute 'type' of 'ImageExport' objects>

Bitmap type. See allTypes list for more info. Read/write string.